home *** CD-ROM | disk | FTP | other *** search
/ Aminet 45 / Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso / Aminet / game / role / ldmud-3.2-bin.lha / mud / doc / applied / reset < prev   
Text File  |  2001-04-23  |  1KB  |  33 lines

  1. SYNOPSIS
  2.         void reset(int arg)        /* compat mode */
  3.         void reset(void)        /* native mode */
  4.  
  5. DESCRIPTION
  6.         In compat mode, reset() is called with arg 0 after the object
  7.         was compiled, and with arg != 0 every once in a while.        In
  8.         native mode, create() is called after compiling, and reset()
  9.         is called without arguments every once in a while.
  10.  
  11.         So, if the argument is zero, the parser is running in compat
  12.         mode, and reset() may call your create() code. If create() is
  13.         called, you're on the new version and reset() is not called
  14.         for object creation. You may call reset() from create() and
  15.         vice versa, but make sure they do not call each other
  16.         recursive on either type of driver.
  17.  
  18.         reset() will be called only in objects that have been used
  19.         since the last call to reset(), i.e. a function in them was
  20.         called (other than reset() or clean_up()), or it was moved
  21.         around.
  22.  
  23.         This function can be used to reset the state of the object or
  24.         do some checks or what ever. The game wouldn't be fun if no
  25.         challenges remained.
  26.  
  27.         For 3.2.1, the mudlib can be programmed to call an other lfun
  28.         than reset() to reset an object.
  29.  
  30. SEE ALSO
  31.         clean_up(A), heart_beat(A), call_out(E), create(A), __INIT(A),
  32.         hooks(C), initialisation(M), native(C)
  33.